/*   1:    */ package org.intellij.html;
/*   2:    */ 
/*   3:    */

import com.intellij.html.impl.RelaxedHtmlFromSchemaElementDescriptor;
import com.intellij.psi.PsiElement;
import com.intellij.psi.xml.XmlAttribute;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.ArrayUtil;
import com.intellij.xml.*;
import com.intellij.xml.util.HtmlUtil;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */ 
/*  15:    */ public class RelaxedHtmlFromRngElementDescriptor
/*  16:    */   implements XmlElementDescriptor, XmlElementDescriptorAwareAboutChildren
/*  17:    */ {
/*  18:    */   private final XmlElementDescriptor a;
/*  19:    */   
/*  20:    */   public RelaxedHtmlFromRngElementDescriptor(XmlElementDescriptor paramXmlElementDescriptor)
/*  21:    */   {
/*  22: 33 */     this.a = paramXmlElementDescriptor;
/*  23:    */   }
/*  24:    */   
/*  25:    */   public XmlElementDescriptor getElementDescriptor(XmlTag paramXmlTag1, XmlTag paramXmlTag2)
/*  26:    */   {
/*  27: 37 */     XmlElementDescriptor localXmlElementDescriptor = this.a.getElementDescriptor(paramXmlTag1, paramXmlTag2);
/*  28: 39 */     if (localXmlElementDescriptor == null) {
/*  29: 40 */       return RelaxedHtmlFromSchemaElementDescriptor.getRelaxedDescriptor(this, paramXmlTag1);
/*  30:    */     }
/*  31: 43 */     return localXmlElementDescriptor;
/*  32:    */   }
/*  33:    */   
/*  34:    */   public String getQualifiedName()
/*  35:    */   {
/*  36: 48 */     return this.a.getQualifiedName();
/*  37:    */   }
/*  38:    */   
/*  39:    */   public String getDefaultName()
/*  40:    */   {
/*  41: 53 */     return this.a.getDefaultName();
/*  42:    */   }
/*  43:    */   
/*  44:    */   public XmlElementDescriptor[] getElementsDescriptors(XmlTag paramXmlTag)
/*  45:    */   {
/*  46: 57 */     return (XmlElementDescriptor[])ArrayUtil.mergeArrays(this.a.getElementsDescriptors(paramXmlTag), HtmlUtil.getCustomTagDescriptors(paramXmlTag));
/*  47:    */   }
/*  48:    */   
/*  49:    */   public XmlAttributeDescriptor[] getAttributesDescriptors(XmlTag paramXmlTag)
/*  50:    */   {
/*  51: 64 */     return RelaxedHtmlFromSchemaElementDescriptor.addAttrDescriptorsForFacelets(paramXmlTag, this.a.getAttributesDescriptors(paramXmlTag));
/*  52:    */   }
/*  53:    */   
/*  54:    */   public XmlAttributeDescriptor getAttributeDescriptor(XmlAttribute paramXmlAttribute)
/*  55:    */   {
/*  56: 69 */     return getAttributeDescriptor(paramXmlAttribute.getName(), paramXmlAttribute.getParent());
/*  57:    */   }
/*  58:    */   
/*  59:    */   public XmlNSDescriptor getNSDescriptor()
/*  60:    */   {
/*  61: 74 */     return this.a.getNSDescriptor();
/*  62:    */   }
/*  63:    */   
/*  64:    */   public XmlElementsGroup getTopGroup()
/*  65:    */   {
/*  66: 79 */     return this.a.getTopGroup();
/*  67:    */   }
/*  68:    */   
/*  69:    */   public int getContentType()
/*  70:    */   {
/*  71: 84 */     return this.a.getContentType();
/*  72:    */   }
/*  73:    */   
/*  74:    */   public String getDefaultValue()
/*  75:    */   {
/*  76: 89 */     return null;
/*  77:    */   }
/*  78:    */   
/*  79:    */   public XmlAttributeDescriptor getAttributeDescriptor(String paramString, XmlTag paramXmlTag)
/*  80:    */   {
/*  81: 93 */     XmlAttributeDescriptor localXmlAttributeDescriptor = this.a.getAttributeDescriptor(paramString.toLowerCase(), paramXmlTag);
/*  82: 94 */     if (localXmlAttributeDescriptor != null) {
/*  83: 94 */       return localXmlAttributeDescriptor;
/*  84:    */     }
/*  85: 96 */     return RelaxedHtmlFromSchemaElementDescriptor.getAttributeDescriptorFromFacelets(paramString, paramXmlTag);
/*  86:    */   }
/*  87:    */   
/*  88:    */   public PsiElement getDeclaration()
/*  89:    */   {
/*  90:101 */     return this.a.getDeclaration();
/*  91:    */   }
/*  92:    */   
/*  93:    */   public String getName(PsiElement paramPsiElement)
/*  94:    */   {
/*  95:106 */     return this.a.getName(paramPsiElement);
/*  96:    */   }
/*  97:    */   
/*  98:    */   public String getName()
/*  99:    */   {
/* 100:111 */     return this.a.getName();
/* 101:    */   }
/* 102:    */   
/* 103:    */   public void init(PsiElement paramPsiElement)
/* 104:    */   {
/* 105:116 */     this.a.init(paramPsiElement);
/* 106:    */   }
/* 107:    */   
/* 108:    */   public Object[] getDependences()
/* 109:    */   {
/* 110:121 */     return this.a.getDependences();
/* 111:    */   }
/* 112:    */   
/* 113:    */   public boolean allowElementsFromNamespace(String paramString, XmlTag paramXmlTag)
/* 114:    */   {
/* 115:126 */     return true;
/* 116:    */   }
/* 117:    */   
/* 118:    */   public int hashCode()
/* 119:    */   {
/* 120:131 */     return this.a.hashCode();
/* 121:    */   }
/* 122:    */   
/* 123:    */   public boolean equals(Object paramObject)
/* 124:    */   {
/* 125:136 */     return (paramObject == this) || (((paramObject instanceof RelaxedHtmlFromRngElementDescriptor)) && (this.a.equals(((RelaxedHtmlFromRngElementDescriptor)paramObject).a)));
/* 126:    */   }
/* 127:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.html.RelaxedHtmlFromRngElementDescriptor

 * JD-Core Version:    0.7.0.1

 */